package com.zmc.lostfound.common.feign;

import com.zmc.lostfound.common.feign.fallback.PostFallbackFactory;
import com.zmc.lostfound.common.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author ZMC
 * @description Post帖子管理服务远程调用接口
 */
@FeignClient(value = "lostfound-post", fallbackFactory = PostFallbackFactory.class)
public interface PostFeign {

    /**
     * 按帖子id查询帖子详情信息
     *
     * @param postId 帖子id
     * @return PostDetailInfoDTO (key = postDetailInfoVO)
     */
    @GetMapping("/post/post/query/detailInfoByPostId/{postId}")
    Result queryDetailInfoByPostId(@PathVariable("postId") Long postId);

}
